package com.javabean;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.model.DataBase;

public class CanelBf {
	PreparedStatement pre;
	Connection con = DataBase.getConnection();

	public void canel(int id) {
		String sql = "update device set isUse=? where did=?";

		try {
			pre = con.prepareStatement(sql);
			pre.setString(1, "yes");
			pre.setInt(2, id);
			pre.executeUpdate();
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}
